<template>
	<view class="seckill" v-if="seckillList.length>0"> 
		<u-section :showLine="false" title="限时秒杀" sub-title="更多" :bold="false" @click="clickMore"></u-section>
		<u-grid :col="4" :border="false" @click="clickItem">
			<u-grid-item v-for="(item, index) in seckillList[0].goods" :key="index" :index="item.id" v-if="index<4">
				<u-image  width="150rpx" height="150rpx" :src="item.image_first"></u-image>
				<view class="price">¥{{item.price}}</view>
				<view class="u_price">¥{{item.line_price}}</view>
			</u-grid-item>
		</u-grid>
	</view>
</template>

<script>
	export default {
		props: ["seckillList"],
		data() {
			return {
			}
		},
		methods: {
			clickMore(){
				uni.navigateTo({
				  url: '/goods/seckill'
				});
			},
			clickItem(id){
			    uni.navigateTo({
				  url: '/seckill/goodsDetail?id='+id
				});
			}
		}
	}
</script>

<style>
	.seckill{
		margin: 0 10rpx 10rpx;
		padding: 20rpx 20rpx;
		border-radius: 10rpx;
		background-color: #fff;
	}
	.price{
		color: #FA3534;
	}
	.u_price{
		color: #909399;
		font-size: 25rpx;
		text-decoration: line-through;
	}
</style>
